import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { HttpClient } from '@angular/common/http';
import { FormsModule } from '@angular/forms';
import { MarkdownModule, MarkedOptions } from 'ngx-markdown';
import { AlertModule, CheckboxModule, DatatableModule, GroupModule, RadioModule, TabsModule, TagModule } from '@iux/live';
import { ExampleViewerModule } from '../example-viewer/example-viewer.module';
import { AnchorModule } from '../anchor/anchor.module';
import { CaseContentComponent, SafePipe } from './case-content.component';

@NgModule({
  declarations: [CaseContentComponent, SafePipe],
  imports: [
    CommonModule,
    FormsModule,
    TabsModule,
    AlertModule,
    GroupModule,
    RadioModule,
    DatatableModule,
    CheckboxModule,
    MarkdownModule.forRoot({
      loader: HttpClient,
      markedOptions: {
        provide: MarkedOptions,
        useValue: {
          gfm: true,
          breaks: false,
          pedantic: false,
          smartLists: true,
          smartypants: false,
        },
      },
    }),
    ExampleViewerModule,
    AnchorModule,
  ],
  exports: [CaseContentComponent],
})
export class CaseContentModule {}
